<!DOCTYPE html>

<html data-dpr="1" style="font-size:37.5px;" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="applicable-device" content="mobile">
    <link rel="stylesheet" type="text/css" href="//img2.tuniucdn.com/ms/201907111800/ticket/search-dad929.min.css">
    <title>门票搜索</title>
    <meta name="keywords" content="门票搜索">
    <meta name="description" content="门票搜索">
    <meta name="HandheldFriendly" content="true">
    <meta name="MobileOptimized" content="width">
    <meta name="viewport" id="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="apple-touch-icon" sizes="72x75" href="/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-retina.png">
    <!--<script async="" src="//img4.tuniucdn.com/w/j/20160907/common/tac.js,common/ga.js"></script>
    <script>
        var m2015Config = m2015Config || {};
        m2015Config.cdnHost = "//img1.tuniucdn.com";
        m2015Config.timeStamp = "201907111813";

        var pageFlag = "";
        document.cookie = "page_flag=" + pageFlag + ";domain=.tuniu.com;path=/;";
    </script>
    <script src="//img1.tuniucdn.com/mj/201907111813/global/fta.min.js"></script>
    <script>
        window.FTA && window.FTA("", "无线:度假:门票:搜索", "", "/无线/度假/门票/搜索");
    </script>-->
    <!---->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/travel.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/tichetCommon.js"></script>
</head>
<script>
    $(function () {
        //获取传过来的参数
        var key = unescape(getParams().key);
        console.log(key);

        //设置时间格式
        function formatterDateTime() {
            var date = new Date()
            var month = date.getMonth() + 1
            var datetime = date.getFullYear()
                + ""// "年"
                + (month >= 10 ? month : "0" + month)
                + ""// "月"
                + (date.getDate() < 10 ? "0" + date.getDate() : date
                    .getDate())
                + ""
                + (date.getHours() < 10 ? "0" + date.getHours() : date
                    .getHours())
                + ""
                + (date.getMinutes() < 10 ? "0" + date.getMinutes() : date
                    .getMinutes())
                + ""
                + (date.getSeconds() < 10 ? "0" + date.getSeconds() : date
                    .getSeconds());
            return datetime;
        }

        //给假搜索框绑定点击事件
        $("#fakeSearchBox").click(function () {
            //显示真搜索框
            $("#realSearchBox").attr("style",'');
        })
        //设置返回按钮
        $(".indexBack").attr("href",'');
        $(".indexBack").click(function () {

        });

        //定义全局变量来接收新搜索框内容
        var sraechContent;

        //给新搜索框绑定点击事件
        $(".realInput").click(function () {
            //获取搜索框内容
            sraechContent=$(this).val();
        });

        //给搜索按钮绑定点击事件
        $(".searchSpan").click(function () {
            //调用搜索框的点击事件
            $(".realInput").click();
            console.log(sraechContent);
            //将获取的内容赋给key
            //对获取的内容进行编码
            var url=escape(sraechContent);
            //跳转到搜索结果页面
            window.location.href="/ticketSearch.html?key="+url;

        })
        //给标题和假搜索框绑定数据
        $(".headerTitle").html(key);
        $(".fakeSearch").html(key);
        var keys=escape(key);
        $.ajax({ //请求数据
            type: 'post',
            url: 'http://route.showapi.com/1681-1',
            dataType: 'json',
            data: {
                "showapi_timestamp": formatterDateTime(),
                "showapi_appid": '99840', //这里需要改成自己的appid
                "showapi_sign": '4121c83fea5047e598cca768f06fbe40',  //这里需要改成自己的应用的密钥secret
                "key": key,
                "page": "1",
                "pageSize": "20"
            },
            error: function (XmlHttpRequest, textStatus, errorThrown) {
                alert("操作失败!");
            },
            success: function (result) {
                console.log(result);
                var list = result.showapi_res_body;
                //console.log(list);
                $(".informations").attr("hidden",false);
                //渲染数据
                $("#tickeQuery").renderValues({list:list.result}, {
                    getTicketId: function (item,value) {
                        var url = $(item).data("url") + value+"&"+"key="+keys;
                        $(item).attr("href",url);
                    }
                })
                $(".address").html(key);
            }
        });

    })
    function clearBtn() {
        console.log(1);
        $("#searchFrame").val('');

    }
</script>
<body style="font-size: 12px;background: url('/upload/2.bmp')" >
<div id="J_appDownloadRenderBox"></div>

<div id="search-placeholder" >
    <div z-index="100" sticky-top="0" style="position: sticky; top: 0px; z-index: 100;">
        <!--头标题-->
        <header class="header-box" id="header">
            <span class="header-back">
                <a href="ticketIndex.html" class="icon-title-back effect-active"></a>
            </span>
            <h1><span class="search-select headerTitle">上海</span></h1>
        </header>
    </div>
    <div class="search-main" id="main-container">
        <div class="search-container" id="search-container" >
            <!--假搜索框-->
            <div class="search-btn-box" id="fakeSearchBox">
                <div class="search-btn">
                    <i class="icon-search5" style="color:#c2c6cc"></i>
                    <span class="ft-color-deepgrey fakeSearch">上海</span>
                </div>
            </div>
            <!--搜索内容-->
            <section class="search-list-container" id="tickeQuery" style="position: absolute;">
                <div class="search-list-inner" infinite-scroll-distance="50" infinite-scroll-disabled="loading" >
                    <ul class="search-list-box" style="" render-loop="list">
                        <!--第一个-->
                        <li class="search-block clearfix informations" _v-0e629f75="" hidden>
                            <a class="search-scenic-link" _v-0e629f75="" data-url="/ticketDetails.html?scenicId=" render-fun="getTicketId" render-key="list.scenicId">
                                <div class="img-container lazy-img-box fl" _v-0e629f75="">
                                    <img class="img" _v-0e629f75=""
                                         render-src="list.newPicUrl"
                                         lazy="loaded">
                                </div>
                                <div class="search-scenic-content" _v-0e629f75="">
                                    <h3 class="search-scenic-title ellips ft-color-deepgrey" _v-0e629f75="" render-html="list.scenicName"></h3>
                                    <div class="search-scenic-wrapper" _v-0e629f75="">
                                        <div class="search-scenic-detail" _v-0e629f75="">
                                            <ul class="sale-type clearfix" _v-0e629f75="">
                                                <li class="fl" _v-0e629f75="">
                                                    <span class="sale-lable sale-lable-0" _v-0e629f75="">优惠</span>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="search-scenic-price" _v-0e629f75="">
                                            <i class="rmb-symbol" _v-0e629f75="">¥</i>
                                            <span class="money" _v-0e629f75="" render-html="list.salePrice"></span>起
                                        </div>
                                    </div>
                                    <div class="search-scenic-footer" _v-0e629f75="">
                                        <div class="search-scenic-city ft-color-grey address" _v-0e629f75="" > </div>
                                        <div class="search-scenic-distance ft-color-grey" _v-0e629f75=""></div>
                                    </div>
                                </div>
                            </a>
                        </li>
                    </ul>
                </div>
            </section>
        </div>
    </div>
    <div class="search-panel" style="display: none;" id="realSearchBox">
        <div class="search-float-layer">
            <a class="icon-title-back effect-active indexBack"></a>
            <div class="search-input-ctn">
                <i class="icon-search5 search_btn" style="color:#c2c6cc"></i>
                <form class="search-form">
                    <input id="searchFrame" class="search-input realInput" placeholder="搜索目的地/主题/关键字" required="">
                    <i class="icon-close clear-btn" onclick="clearBtn()"></i>
                </form>
            </div>
            <span class="cancel searchSpan">搜索</span></div>
    </div>
</div>


<script type="text/javascript">
    var no_show_download_p_value = [15485, 16276, 14816, 16194, 14895, 16238, 16576, 16670, 16524, 16525, 16526, 16527, 16528, 16529, 16530, 16531, 16532, 16533, 16534, 16238, 16535, 16667];
    var no_show_slider_p_value = [16276];
    var pageName = "无线:度假:门票:搜索";
</script>
<input type="hidden" id="appTitle" name="appTitle" value="门票搜索">
<div id="tn_app_top_bar" style="display: none;">
    <input id="top_bar_title" value="门票搜索"><input id="top_bar_sub_title" value=""><input id="top_bar_show_refresh"
                                                                                         value=""><input
        id="top_bar_show_search" value=""><input id="top_bar_show_niuxin" value=""><input id="support_magic_scroll"
                                                                                          name="support_magic_scroll"
                                                                                          value="0">
</div>

<div id="bottom_unsafe_area" style="display: none;">
    <input type="hidden" id="bottom_unsafe_area_height" value="34">
    <input type="hidden" id="bottom_unsafe_area_alpha" value="1">
    <input type="hidden" id="bottom_unsafe_area_hex_color" value="#ffffff">
</div>
<script>var globalAjaxControl = {
    "location": false,
    "justLocationIP": false,
    "jumpWhenLocationOver": "",
    "hasJumpCallback": false,
    "user": false,
    "phone": false
};</script>
<!--<script src="//img1.tuniucdn.com/mj/201907111813/global/global.min.js"></script>-->

<script type="text/javascript" src="//img2.tuniucdn.com/mj/201907111813/modules/ticket/search-dad929.min.js"></script>

<script>
    window.COLLECT && window.COLLECT("", "无线:度假:门票:搜索", "", "/无线/度假/门票/搜索");
</script>
<!-- mTime: 2019-07-15 16:07:24 -->

<!--<script src="//img1.tuniucdn.com/mj/201907111813/global/app_download.min.js"></script>-->
</body>
</html>